package boundary;

import java.awt.event.KeyAdapter;
import java.awt.event.KeyEvent;

public class NumericAdapter extends KeyAdapter {

	public void keyTyped(KeyEvent k) {
		char c = k.getKeyChar();
		if (!((Character.isDigit(c) ||
				(c == KeyEvent.VK_BACK_SPACE) ||
				(c == KeyEvent.VK_DELETE))))
			k.consume();
	}
}
